﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using BLL;
using VOL;

namespace Shopper
{
    public partial class frmReport : DevExpress.XtraEditors.XtraForm
    {
        public frmReport()
        {
            InitializeComponent();
        }

        private void frmReport_Load(object sender, EventArgs e)
        {

        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            int MaHoaDon = int.Parse(textEdit1.Text);
            HoaDonBanBL hoadonBl = new HoaDonBanBL();
            DataTable dtHoaDon = hoadonBl.getDataReport(MaHoaDon);

            rptHoaDon _rptHoaDon = new rptHoaDon();
            _rptHoaDon.DataSource = dtHoaDon;
            _rptHoaDon.DataBind();
            _rptHoaDon.CreateDocument();

            documentViewer1.DocumentSource = _rptHoaDon;
        }
    }
}